/**
 * @Copyright 2012, Founder Mobile Media Technology（Chongqing） Co., Ltd L.P. All
 *            rights reserved. The information contained herein is confidential
 *            and proprietary to Founder Mobile Media Technology（Chongqing） Co.,
 *            Ltd, and considered a trade secret as defined under civil and
 *            criminal statutes. Founder Mobile Media Technology（Chongqing） Co.,
 *            Ltd shall pursue its civil and criminal remedies in the event of
 *            unauthorized use or misappropriation of its trade secrets. Use of
 *            this information by anyone other than authorized employees of
 *            Founder Mobile Media Technology（Chongqing） Co., Ltd is granted
 *            only under a written non-disclosure agreement, expressly
 *            prescribing the scope and manner of such use.
 */
package com.g2room.quartz.util;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.JobKey;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.impl.matchers.GroupMatcher;

/**
 * Quartz的Job相关操作<br>
 *
 * @createTime: May 30, 2013 11:53:13 PM
 * @author: <a href="mailto:gaoxg@FOUNDER.COM.CN">Xuguo Gao</a>
 * @version: 0.1
 * @lastVersion: 0.1
 * @updateTime: 
 * @updateAuthor: <a href="mailto:gaoxg@FOUNDER.COM.CN">Xuguo Gao</a>
 * @changesSum: 
 * 
 */
public class JobUtil {
	public static void getAllJobs() {
		try {
			Collection<Scheduler> schedulers = ScheduleUtil.getSchedulers();
			for(Scheduler scheduler : schedulers) {
//				scheduler.getJobGroupNames()
				scheduler.getJobKeys(GroupMatcher.jobGroupEquals(""));
//				for (JobKey key : keys) {
//					JobDetail jobDetail = scheduler.getJobDetail(key);
//					jobs.add(jobDetail);
//				}
			}
//			scheduler.
		} catch (SchedulerException e) {
			e.printStackTrace();
		}
	}
	
	public static List<Job> getJobsByGroupName(String jobGroupName) {
		List<Job> jobs = new ArrayList<Job>();
//		QuartzEngine.getSchedulerFactory().getAllSchedulers();
		return null;
	}
	
//	public static List<String> getJobNamesByGroupName(String jobGroupName) {
//		List<String> jobs
//		return null;
//	}
}
